package xidian.vlab.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xidian.vlab.dto.QueryDTO;
import xidian.vlab.dto.ResJsonDTO;
import xidian.vlab.service.LogService;
import xidian.vlab.utils.ResUtil;

@RestController
@RequestMapping("/log")
public class LogController {
    @Autowired
    private LogService logService;

    @GetMapping("/list")
    public ResJsonDTO getLog(QueryDTO query){
        if (query == null) return ResUtil.ERROR("未提供参数");
        return logService.getLog(query);
    }
}
